import 'package:flutter/material.dart';

class MyApp6 extends StatelessWidget {
  const MyApp6({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      //导航条
      appBar: AppBar(
        title: const Text(
          'Container组件',
          style: TextStyle(color: Colors.white, fontSize: 20),
        ),
        backgroundColor: Colors.pink,
        centerTitle: true,
      ),
      //主题区域
      body: Text(
        '《春宵》 苏轼 \n 春宵一刻值千金，花有清香月有阴。\n 歌管楼台声细细，秋千院落夜沉沉。歌管楼台声细细，秋千院落夜沉沉。\n 歌管楼台声细细，秋千院落夜沉沉。',
        style: TextStyle(
          fontSize: 20,
          color: Colors.red,
          decoration: TextDecoration.underline, //修饰下划线
          decorationColor: Colors.blue, //修饰下划线颜色
          decorationStyle: TextDecorationStyle.dashed, //修饰下划线样式
          decorationThickness: 2, //线条粗细
          height: 1, //类似于行高
          // letterSpacing: 20, //间距
          // wordSpacing: 30,//单词间距
          fontWeight: FontWeight.bold, // 加粗
          fontFamily: 'KaiTi', //设置字体
        ),
        textAlign: TextAlign.center,
        maxLines: 3, //控制几行
        overflow: TextOverflow.ellipsis, //省略号
      ),
    );
  }
}
